import request from '@/utils/request'

// 创建房屋信息
export function createHouseInfo(data) {
  return request({
    url: '/system/house-info/create',
    method: 'post',
    data: data
  })
}
// 删除房屋元信息
export function deleteHouseMetaInfo(id) {
  return request({
    url: '/system/house-meta-info/delete?id=' + id,
    method: 'delete'
  })
}
//id查询房屋朝向信息
export function getHouseMetaInfoid(houseId) {
  return request({
    url: '/system/house-meta-info/selectByHouseId',
    method: 'get',
    params: { houseId }
  })
}
// 更新房屋信息
export function updateHouseInfo(data) {
  return request({
    url: '/system/house-info/update',
    method: 'put',
    data: data
  })
}

// 删除房屋信息
export function deleteHouseInfo(id) {
  return request({
    url: '/system/house-info/delete?id=' + id,
    method: 'delete'
  })
}

// 获得房屋信息
export function getHouseInfo(id) {
  return request({
    url: '/system/house-info/get?id=' + id,
    method: 'get'
  })
}

// 获得房屋信息分页
export function getHouseInfoPage(params) {
  return request({
    url: '/system/house-info/searchMany',
    method: 'get',
    params
  })
}
// 导出房屋信息 Excel
export function exportHouseInfoExcel(params) {
  return request({
    url: '/system/house-info/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}
